<% 
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
	include("/pages/template/head.html"){}
%>
<script type="text/javascript">
	var oper = {
		save:function(id){
			if(!validForm()) {
				return false;
			}
			var url = 'system/cxrole/save/'+id;
			form1.action = url;
			form1.submit();
			return true;
		}	
	};
</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal"
		role="form" >
	<input type="hidden" name="model.ids" value="${model.ids}" />
	<table class="table">
		<%  // 列表头部%>
		<tr>
			<td>上级角色</td>
			<td>
			  	<select name="model.parentids" class="form-control" valid="vselect" validname="请选择">
					<option value="-1">请选择上级</option>
					${selectRole }
					</select>
			</td>
		</tr>
		<tr>
			<td>名称</td>
			<td>
				<input class="form-control" type="text" name="model.names" value="${model.names }" valid='vtext' validname='名称' />
			</td>
		</tr>
		<tr>
			<td>编号</td>
			<td>
				<input class="form-control" type="text" name="model.numbers" value="${model.numbers }" valid='vtext' validname='编号' />
			</td>
		</tr>
		<tr>
			<td>排序</td>
			<td>
				<input class="form-control" type="text" name="model.orderids" value="${model.orderids }" valid='vtext' validname='排序' />
			</td>
		</tr>
		<tr>
			<td>描述</td>
			<td>
				<textarea class="form-control" rows="3" cols="30" name="model.description" valid='vtext' >${model.description}</textarea>
			</td>
		</tr>
	</table>
	
	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
	  <div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
		<button class="btn btn-primary" onclick="oper.save('${model.id}');return false;">保 存</button>
		<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
	  </div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
<%}
DIRECTIVE SAFE_OUTPUT_CLOSE; 
%>